package com.atguigu.gmall.product.service.impl;

import com.atguigu.gmall.product.vo.CategoryTreeVo;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.gmall.product.entity.BaseCategory1;
import com.atguigu.gmall.product.service.BaseCategory1Service;
import com.atguigu.gmall.product.mapper.BaseCategory1Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class BaseCategory1ServiceImpl extends ServiceImpl<BaseCategory1Mapper, BaseCategory1> implements BaseCategory1Service{

    @Autowired
    BaseCategory1Mapper baseCategory1Mapper;

    @Override
    public List<CategoryTreeVo> getCategoryTree() {
        List<CategoryTreeVo> list = baseCategory1Mapper.getCategoryTree();
        return list;
    }

    @Override
    public CategoryTreeVo getCategoryTreeByCId(Long cId) {
        CategoryTreeVo categoryTreeVo = baseCategory1Mapper.getCategoryTreeByCId(cId);
        return categoryTreeVo;
    }
}




